Reefer Information and Installation
by Bin-Masta

Note: Reefers will not work for MTM1.

Hint: Print this text file out, it will help you.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                        x
Menu                                                    x
                                                        x
  I. The Prototype Reefer                               x
 II. How to Determine What Reefer You Downloaded        x
III. How to Install Reefers                             x
                                                        x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

-------------------------------------------------------------------------------------------------
I. The Prototype Reefer  >
-------------------------
  A Reefer is a Refrigerated Railroad Car typically used for hauling fruit.
  The one you have downloaded is a 50' Rib Side Mechanical Reefer modeled after
  ones built in the 1960s for the Western Railroads.  

-------------------------------------------------------------------------------------------------
II. How to Determine What Reefer You Downloaded  >
-------------------------------------------------
  For this explanation, consider that you downloaded  
  aaaaabbc.zip

  the first five letters, represented here by 5 'A's, stand for the type of Railroad Car.
  All the reefers have 'reefr' as the first five letters.

  the 6th and 7th letters represented here by 2 'B's, stand for the roadname
  (and thus paintscheme) of the reefer.

  np-----stands for Northern Pacific
         its colors are silver all around with a black and red logo
  pf-----stands for Pacific Fruit Express
         its colors are orange, with black ends, and big black lettering on the side
  sf-----stands for Sante Fe
         its colors are red/orange, with a silver roof and a black door and a black logo

  the 8th character, represented here by a 'C', stands for the complexity level
  0-----251 faces and 297 vertices
        this level is recommended for long trains, 8 cars or more, such as the train in
        Yeastman's track Deception Pass

  1-----541 faces and 569 vertices
        this level is recommended for short trains, 3 to 7 cars. These reefers are the same
        as the complexity level 0 reefers, but they feature couplers.  Couplers are the joints
        between train cars.  This added in feature puts the stock train cars to shame.

  2-----973 faces and 995 vertices
        this level is recommended for single use only, and it is discouraged to place them
        in moving trains.  The vertex count is just within bounds of crashing mtm2, but is safe
        to use for any graphics card.  Driving by this bin slows the frame rate by 40% on my 
        Pentium II 266.  However, Despite the lag, this bin seriously is the ultimate in realism.

-------------------------------------------------------------------------------------------------
III. How to Install Reefers  >
-----------------------------
  I will be blunt.  Installing the reefers is a pain.
  However, depending on the complexity level, it can be easy.

  For all general purposes, here is how to install a bin using TRI's Track Edit
     1)After extracting the art files into the art folder
       and the bin files into the models folder u should launch Track Edit
     2) Select Level-Editor and choose the track u wish to install the reefer into
     3) Select Add Boxes
     4) press "f" and scroll down to reef***.bin----press enter
     5) use the arrow keys to move around the environment
        holding down ALT plus the arrow keys makes moving the bin slower and more contolable.
        use PgDn to rotate the bin clockwise, End to rotate the bin counter clockwise
        HINT: the viewing angle can make it hard to tell if the bin is lined up with others
             I like a bird's eye viewing angle when installing reefers.
             To acheive this press 'E', then hold down shift and the up arrow until 
             'Eye P' in the bar menu is 90.  
             Then hold down shift and the right or left arrow until
             'Eye H' in the bar menu is 0, 90, 180 or 270.
             Press 'E' again to stop changing the Eye View
             use the '-' key to zoom out and the '=' key to zoom in.
             to save this viewing angle hold down shift and press F1, F2, F3 or F4.
             to recall the viewing angle whenever in Track Edit again simlpy press
             the function key in which you saved it under.
     6) after the bin is positioned where you want it press 'B' to set the box properties
        if you want the bin to just be like a 1000 ton brick wall press esc to abort
        otherwise you can set the type, flags, scenery level, mass and sounds.
     7) This is the most important step: press the space bar to actually place the bin.
     8) repeat steps 4 trough 7 to your heart is content
     9) press escape to exit---press 'Y' to save changes at the promt.


     okay, Now for the specifics that depend on the complexity level.

     level 0-----this one is the easiest to install.  Install it like any other bin.
                 Recommended spacing in between reefers is half a texture length or about
                 8 feet.
     level 1,2---these levels are a bit tricky to install.  The reefers must overlap each other.
                 The spacing between reefers is a precise number.  To do this it is necessary to
                 modify the situation file
                
 Follow these steps to install a level 1 or 2 complexity refer

1) Place them in TrackEd just like any other bin with the following exceptions
   -Center them in the best of your ability above the train track texture
   -Write down the rotations that you used (either 0 and 180 or 90 and 270)
   -Install them in order of apperence, don't skip around the train placing reefers
        in other words move left to right placing reefers or vise versa
   -Dont worry about setting bin types, it will be done later

2) save the situation and exit TrackEd

3) open Windows Explorer and goto your MTM2 directory--
   usually its C:\Program Files\Microsoft Games\Monster Truck Madness 2\

4) open the world directory----\world

5) open the situation file of your track with Wordpad
   to do this shift+rightclick on the situation file and select "open with"
   select Wordpad from the list

6) go up to the taskbar and click Edit, then click on Find
   at the prompt, type in ".bin"
   this step will automatically jump the cursor to the very first bin

7) Click on "Find Next" until you recognize the name of a reefer.  Click on cancle

8) Notice below ipos there are 3 numbers seperated by commas.  These numbers represent the position
   of the bin.  I will refer to them as x, y, and z
	   for example, if the sit looked like this:
			ipos
			2429.328125,132.167969,1940.953125

           x is 2429.328125, y is 132.167969, and z is 1940.953125

9) If you were following these directions carefully, you would have written down the rotations you used
   if you forgot, go back to TrackEd and find out.
   Now, this concept is very important to understand, so PAY ATTENTION
           if the reefers were installed as 0 degrees or 180 degrees, then the x value remains the same
           through out the entire train, and the z value represents the position along the tracks
     Otherwise, 
           if the reefers were installed as 90 degrees or 270 degrees, then the z value remains the same
           through out the entire train, and the x value represents the position along the tracks
   
   From this point on, I will refer to the value that remains the same through out the entire train as
   the "Centering Constant".  Remeber, the Centering Constant is x if you installed the reefers with
   0 or 180 degree rotations, and the Centering Constant is z if you installed the reefers with 90 or
   270 degree rotations.

   From this point on, I will refer to the value that represents the position along the tracks as 
   the "Position Variable". Remeber, the Position Variable is z if you installed the reefers with
   0 or 180 degree rotations, and the Position Variable is x if you installed the reefers with 90 or
   270 degree rotations.

10) Go through every bin in the train (including Non-Reefers) and replace the 6 decimals of the
    Centering Constant, and Position Variable with zeros. (Note: Don't change the y value)

11) Find a reefer bin and look at its Centering Constant.  To make it a true center i made this
    algorithm to follow.
           a) Divide the Centering Constant by 16 and get the remainder
           b) Change the Centering Constant based on this table 
		--------------------------------------------
		| remainder | change to Centering Constant |
		--------------------------------------------
		|     0     |       no change              |
		|     1     |       subtract 1             |
		|     2     |       subtract 2             |
		|     3     |       subtract 3             |
		|     4     |       subtract 4             |
		|    12     |       add 4                  |
		|    13     |       add 3                  |
		|    14     |       add 2                  |   
		|    15     |       add 1                  |
		--------------------------------------------
            c) if your remainder did not appear in the table, look at another bin's Centering Constant
               and repeat steps a and b

    for example, say a reefer had a Centering Constant of 1934.000000
                 the remainder would be 14 when divided by 16.
                 the table says that when a remaider is 14, add 2 to the Centering Constant
                 1934.000000 + 2 = 1936.000000
                 So I would have to change 1934.000000 to 1936.000000
   
 A final check would be to make sure the Centering Constant when divided by 16 gives an odd whole number
 1936 / 16 = 121 ( odd whole number )

12) Go through the entire train, and change all the Centering Constants to the number you got in step 11

13) Now its time to work with the Position Variable.  First scroll upward to the first appearence of a
    reefer.  If a reefer comes next, take the Position Variable of the first reefer, add 96 
    and use this number in place of the second reefer.  96 is the length of the car minus the overlap
    due to coupler overlapping
    
    For Example, say that a train was installed with a rotation of 90 or 270 degrees
    because of the rotation, the Position Variable is the x coordinate
    the first reefer's ipos could look something like this

     (First Reefer)   
 		ipos
		2546.000000,132.167969,1936.000000

    2546 + 96 = 2642
    so the next reefer's Position Variable would be 2642.000000 as shown below

     (Second Reefer)
		ipos
		2642.000000,132.167969,1936.000000

    
     This process of adding 96 to the Position Variable should be repeated throught all the reefers
     say that there was a third reefer in the train.  Its ipos would look like this

      (Third Reefer)
		ipos
		2738.000000,132.167969,1936.000000
      
       because 2642 + 96 = 2738


     Note: If there is another train car with couplers and you would like to put it next to a different
           type of train car with couplers, take the average of their lengths 
           ( provided in the text files ) then use that number for spacing.
            
            for example, say that a caboose had a length of 70 and i wanted to put it next to a reefer
            i would have to take the reefer's Position Variable, add 83, and use that number in place
            of the caboose's Position Variable.  The reason is that the average of 70 and 96 is 83.
     
     Comment:  This is very hard to understand, and im not much of a technical writer, so if you have 
               any questions don't hesitate to contact me.


14)  Congratulations, You have made it past the hard part.  Now for some extra features
     If you don't want your train to be in motion, jump to step number 18
     
     To make your train move, you must change two lines ( per bin )of the sit file.
     To see those steps in action, proceed to step 15.

15)  In the sit file, under every bin there are 2 setting called type and flags.  
     It appears as "!type,flags"
     For a moving train, the type is 10 and the flag is 0.
     Go through every bin in your train, and overwrite the line below "!type,flags" with "10,0"

16)  You have set the bins to be a train, but right now it is a stopped train. 
     To set it in motion, you must change the line below "bvel".

     before you punch in numbers, ask your self how fast you want your train to travel (mph).
     take your speed and multiply it by 10 / 7 ( ten sevenths ).  
     The number that you got is what you should use as your speed (Round off if necessary)

17)  Now it is time to change the numbers under "bvel"
     
     If you installed the train with a rotation of 0 or 180 degrees than the number you got in step 16
     should go in the third position.
     
     If you installed the train with a rotation of 90 or 270 degrees than the number you got in step 16
     should go in the first position.

     Note: The numbers under bvel aren't really speeds.  They are velocities. 
           The difference between speed and velocity is that velocity can be negative and 
           speed cannot be.  A negative velocity represents an object moving backwards relative to
           some external scale.
           However, it may be necessary to use a negative velocity depending on the direction 
           you want your train to move relative to the game's interpretation of positive and negative.
           Ive found that the fastest way to find out wheather you need a positive or negative
           velocity is trial and error.  Try a positive number first.  If the train moves backwards,
           switch it to negative.
     
     Copy the line you made and go through all bins in the train, pasting the numbers that you copied
     under bvel.
         
     for example, say the train had rotations of 0 or 180 degrees, and i wanted the train to travel
     56 mph.  56 * ( 10 / 7 ) = 80
     The line under bvel would change to
          0.000000,0.000000,80.000000
     or       
          0.000000,0.000000,-80.000000
     
     another example, say that the train had rotations of 90 or 27 degrees, and i wanted the train to 
     travel at 35 mph.  35 * ( 10 / 7 ) = 50
     The line under bvel would change to 
          50.000000,0.000000,0.000000
     or
          -50.000000,0.000000,0.000000

18) Make sure to save the sit.  

19) Go back to TrackEd and do a test drive.
    Look closely at the coupler's they should grip like two hands playing thumb war.

20) If you made it to this step, consider your self as gifted as I am.
    Enjoy your train!
          
-------------------------------------------------------------------------------------------------

If you have a few questions as to what i mean in this text file, please contact me

this bin, and this document was created by
Bin-Masta
bin-masta@geocities.com
http://www.geocities.com/MotorCity/Garage/5527/

all rights reserved
for more information, view
Bin-Masta's Readme, included in the zip file
    
            